<ion-view>
  <ion-header-bar class="bar bar-header header">
    <button on-touch="goback()" class="button return-btn">返回</button>
    <h1 class="title" ng-click="backToTop()" ng-if="lookMember">{{lookMember.member_name}}的酒窝</h1>
  </ion-header-bar>
  <ion-content class="gray-bg" has-bouncing="true" on-touch="touchIndex()" on-swipe-left="swipeLeft()" on-swipe-right="swipeRight()">
    <div ng-if="lookMember">
          <div class="dimple-hd-pic">
            <div class="dimple-hd-bg">
              <button type="button" class="button button-small user-dimple-hd-btn" ng-click="noFoucsMember(lookMember.member_id)" ng-if="lookMember.isAttend">取消关注</button>
              <button type="button" class="button button-small user-dimple-hd-btn" ng-click="foucsMember(lookMember.member_id)" ng-if="!lookMember.isAttend">
                <i class="dimple-care-icon"></i>关注</button>
              <div class="dimple-hd-user">
                <div class="dimple-hd-user-box">
                  <img ng-src="{{picPath}}{{lookMember.member_img_url}}" ng-click="go2MemberInfo(lookMember.member_id)" alt=""/>
                  <i class="dimple-hd-user-icon"><img ng-src="{{picPath}}{{lookMember.mr_img_url}}" alt=""/></i>
                </div>
                <div class="dimple-hd-user-tit" ng-bind="lookMember.member_name"></div>
              </div>
            </div>
          </div>
          <div class="tabs user-dimple-nav">
            <a class="tab-item" ng-class="{'active':showWhich[0]}" on-touch="showAttendList()">
              <em class="user-dimple-nav-tit">关注</em>
              <span class="user-dimple-nav-num" ng-bind="lookMember.member_attention_count">0</span>
            </a>
            <a class="tab-item" ng-class="{'active':showWhich[1]}" on-touch="showHomeList()">
              <em class="user-dimple-nav-tit">酒窝</em>
              <span class="user-dimple-nav-num" ng-bind="lookMember.member_home_count">0</span>
            </a>
            <a class="tab-item" ng-class="{'active':showWhich[2]}" on-touch="showMeetingList()">
              <em class="user-dimple-nav-tit">约局</em>
              <span class="user-dimple-nav-num" ng-bind="lookMember.member_appointment_count">0</span>
            </a>
          </div>
          <!---关注开始--->
          <div class="list user-list" ng-if="showWhich[0] && userAttendMemberList && userAttendMemberList.length>0">
            <a class="item item-avatar-left" ng-repeat="member in userAttendMemberList" ng-if="userAttendMemberList">
              <button type="button" ng-if="!member.isAttend && loginMemberId!=member.member_id" ng-click="foucsMember(member.member_id,$index)" class="button button-small user-care-li-btn"><i class="dimple-care-icon"></i>关注</button>
              <button type="button" ng-if="member.isAttend && loginMemberId!=member.member_id" ng-click="noFoucsMember(member.member_id,$index)" class="button button-small user-care-li-btn">取消关注</button>
              <div class="user-li-hd">
                <em class="user-li-hd-pic"><img ng-src="{{picPath}}{{member.member_img_url}}" ng-click="go2MemberInfo(member.member_id)" alt=""/></em>
                <i class="user-li-hd-icon"><img ng-src="{{picPath}}{{member.mr_img_url}}" alt=""/></i>
              </div>
              {{member.member_name}}
            </a>
          </div>
      <!---关注结束-->
    <!--用户的酒窝-->
      <div ng-if="showWhich[1]">
        <div class="list card dimple-card-item" ng-repeat="item in userHomeList">
          <div class="item item-avatar">
            <div class="dimple-card-user-hd">
              <div class="dimple-card-user-hd-pic" ng-click="go2OtherHome(item.homeMemberInfo.member_id)">
                <img ng-src="{{picPath}}{{lookMember.member_img_url}}" alt=""/>
                <i class="dimple-card-user-hd-icon"><img ng-src="{{picPath}}{{lookMember.mr_img_url}}" alt=""/></i>
              </div>
            </div>
            <h2 ng-bind="lookMember.member_name"></h2>
            <p style="font-size:11px">{{item.mh_create_time}}</p>
          </div>
          <div class="item item-body dimple-card-content">
            <p ng-bind="item.mh_content"></p>

            <div class="dimple-card-photo-list" ng-if="item.picSrc.length>1">
              <div class="dimple-card-photo-item" ng-repeat="pic in item.picSrc">
                <a ng-click="showBigImage($parent.$index,$index)" class="dimple-card-photo-li-pic"><img ng-src="{{picPath}}{{pic.src}}" alt=""/></a>
              </div>
            </div>
            <div ng-if="item.picSrc.length==1" style="padding:5px 0">
              <img ng-src="{{picPath}}{{item.picSrc[0].src}}" ng-click="showBigImage($parent.$index,$index)" ng-style="{width:item.picSrc[0].w/item.picSrc[0].h>=5||item.picSrc[0].h/item.picSrc[0].w>=5?'20%':'50%'}" alt=""/>
            </div>
            <div class="dimple-card-address" ng-bind="item.mh_location"></div>
          </div>
          <div class="item tabs dimple-card-tad">
            <div class=" tabs tabs-icon-only card-item-ctrl">
              <a class="tab-item" on-touch="showHomeShare(item.mh_id)" ng-show="isShareShow">
                <i class="icon card-share-icon" ></i>
              </a>
              <a class="tab-item">
                <i class="icon card-collect-icon" ng-click="collectHome($index,item.mh_id)" ng-class="{'active':item.mchomeStatus}"></i>
              </a>
              <a class="tab-item">
                <i class="icon card-praise-icon" ng-click="likeHome($index,item.mh_id)" ng-class="{'active':item.lhomeStatus}">
                </i>
              </a>
              <a class="tab-item" ng-href="#/homeComment/{{item.mh_id}}">
                <i class="icon card-comment-icon"><em class="ctrl-nav-num" ng-bind="item.mh_comment_num"></em></i>
              </a>
            </div>
          </div>
        </div>
      </div>
    <!--用户的酒窝结束-->
    <!--用户的约局-->
    <div ng-if="showWhich[2]" class="list">
      <ul>
        <li class="card card-item-li" ng-repeat="meeting in userMeetingList">
          <a ng-href="#/date-details/{{meeting.mm_id}}">
            <div class="item item-image">
              <div class="card-item-img">
                <div class="card-item-bg">
                  <div class="card-item-con">
                    <h3 ng-bind="meeting.mm_title">周末一起以酒会友</h3>

                    <p class="card-item-blue"><i class="card-addr-icon"></i>{{meeting.mm_address}}</p>

                    <p><i class="card-time-icon"></i>{{meeting.mm_time | date:"yyyy-MM-dd hh:mm"}}</p>
                  </div>
                </div>
                <img style="width:100%;height:250px" ng-src="{{picPath}}middle_{{meeting.mm_img_url}}" style="height:250px;width:100%" alt=""/>
              </div>
            </div>
            <div class="item item-avatar card-item-tit">
              <div class="card-user-hd">
                <a>
                  <div class="card-user-hd-pic">
                    <img ng-src="{{picPath}}{{lookMember.member_img_url}}" alt=""/>
                    <i class="card-user-hd-icon"><img ng-src="{{picPath}}{{lookMember.mr_img_url}}" alt=""/></i>
                  </div>
                </a>
              </div>
              <h2 class="card-user-hd-name" ng-bind="lookMember.member_name"></h2>

              <div class="tabs tabs-icon-only card-item-ctrl">
                <a class="tab-item" on-touch="showMeetingShare(meeting.mm_id)" ng-show="isShareShow">
                  <i class="icon card-share-icon" ></i>
                </a>
                <a class="tab-item" ng-click="collectMeeting($index,meeting.mm_id)">
                  <i class="icon card-collect-icon" ng-class="{'active':meeting.mcmeetStatus}"></i>
                </a>
                <a class="tab-item" ng-click="likeMeeting($index,meeting.mm_id)">
                  <i class="icon card-praise-icon" ng-class="{'active':meeting.lmeetStatus}"></i>
                </a>
                <a class="tab-item" ng-href="#/meetingComment/{{meeting.mm_id}}">
                  <i class="icon card-comment-icon"><em class="ctrl-nav-num" ng-bind="meeting.mm_comment_num"></em></i>
                </a>
              </div>
            </div>
          </a>
        </li>
      </ul>
    </div>
    <!--用户的约局结束-->
    <ion-infinite-scroll
      on-infinite="loadMore()"
      ng-if="(showWhich[1]&&homeHasNextPage())||(showWhich[2]&&meetingHasNextPage())"
      distance="1%"></ion-infinite-scroll>
    </div>
  </ion-content>
</ion-view>
